<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/base.jsp" %>

<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/css/bookTypeManager.css">
	<link rel="stylesheet" href="/css/font-awesome.css">
  <style>
    .content{
       margin-left: 192px; 
       min-height: 700px;
    }
  </style>
</head>
<body>
	<!-- navbar start-->
	<%@ include file="include/top.jsp" %>
    <!-- left -->
    <%@ include file="include/left.jsp" %>

    <!--right -->
<div class="content">
        
        <div class="header">
           <!--  <div class="stats">
               <p class="stat"><span class="number">53</span>tickets</p>
               <p class="stat"><span class="number">27</span>tasks</p>
               <p class="stat"><span class="number">15</span>waiting</p>
           </div> -->

            <h1 class="page-title">Home</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="login.jspx">Home</a> <span class="divider">/</span></li>
            <li class="active">商品系统<span class="divider">/</span></li>
            <li class="active">出版社管理</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                <div class="btn-toolbar">
                    <a class="btn btn-primary" href="publishAdd.jspx"><i class="icon-plus"></i>新出版社</a>
                    <button class="btn">从Excel导入</button>
                    <button class="btn">导出为Excel</button>
                  <div class="btn-group">
                  </div>
                </div>
                <div class="well">
                    <table class="table">
                      <thead>
                        <tr>
                          <th>#</th>
                          <th>出版社名称</th>
                          <th style="width: 26px;"></th>
                        </tr>
                      </thead>
                      <tbody>
                      	<c:forEach items="${requestScope.pagePublish.list}" var="Publish" varStatus="status">
	                      	<tr>
	                          <td>${status.count}</td>
	                          <td>${Publish.publishName}</td>
	                          <td>
	                              <a href="publishEdit.jspx?id=${Publish.id}"><i class="icon-pencil"></i></a>
	                              <a href="" role="button" data-toggle="modal"><i class="icon-remove"></i></a>
	                          </td>
	                        </tr>
                      	</c:forEach>
                       
                      </tbody>
                    </table>
                    
                </div>
                <c:if test="${requestScope.pagePublish.pageSum>1}"><%-- 如果总页数不大于1，不显示页码条 --%>
	                <div class="pagination pull-right">
	                  <ul>
	                    <c:choose>
			                  	<c:when test="${requestScope.pagePublish.page==1}">
				                    <li class="disabled"><a>首页</a></li>
				                    <li class="disabled"><a>上一页</a></li>
			                    </c:when>
			                    <c:otherwise>
			                    	<li><a href="publishManager.jspx?page=1">首页</a></li>
				                    <li><a href="publishManager.jspx?page=${requestScope.pagePublish.page-1}">上一页</a></li>
			                    </c:otherwise>
			                  </c:choose>
			                  
			                  <c:choose>
			                    <c:when test="${requestScope.pagePublish.page==requestScope.pagePublish.pageSum}">
			                    	<li class="disabled"><a>下一页</a></li>
			                    	<li class="disabled"><a>尾页</a></li>
			                    </c:when>
			                    <c:otherwise>
				                    <li><a href="publishManager.jspx?page=${requestScope.pagePublish.page+1}">下一页</a></li>
				                    <li><a href="publishManager.jspx?page=${requestScope.pagePublish.pageSum}">尾页</a></li>
			                    </c:otherwise>
			                  </c:choose>
	                  </ul>
	                </div>
        		</c:if>
                    
               <footer>
                  <hr>
                  <p>© 2012 <a href="http://www.kaishengit.com" target="_blank">凯盛软件</a></p>
              </footer>
                    
            </div>
        </div>
    </div>


	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){

		});
	</script>
</body>
</html>